package com.guessnumber.soundplayer;

import org.bukkit.SoundCategory;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class test1 implements CommandExecutor {
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
        if (sender instanceof Player){
            if (args.length == 1 && args[0].equals("1"))  ((Player) sender).playSound(((Entity) sender),"helloworldforgao:001", SoundCategory.BLOCKS,100,1);
            else if (args.length == 1 && args[0].equals("2"))  ((Player) sender).playSound(((Entity) sender),"helloworldforgao:002", SoundCategory.BLOCKS,100,1);
            else if (args.length == 1 && args[0].equals("3"))  ((Player) sender).playSound(((Entity) sender),"helloworldforgao:003", SoundCategory.BLOCKS,100,1);
            else ((Player) sender).playSound(((Entity) sender),"helloworldforgao:004", SoundCategory.BLOCKS,100,1);
        }
        return false;
    }
}
